package data.platform.common.merge;

public enum MergePeriod {

    NON(0), DAY(1), WEEK(2), MONTH(3), SEASON(4), YEAR(5);

    private int period;

    MergePeriod(int period) {
        this.period = period;
    }

    public int getPeriod() {
        return period;
    }

    public static MergePeriod getMergePeriod(int period) {
        switch (period) {
            case 1:
                return DAY;
            case 2:
                return WEEK;
            case 3:
                return MONTH;
            case 4:
                return SEASON;
            case 5:
                return YEAR;
            default:
                return NON;
        }
    }
}
